package com.snbc.smcp.pipeline.common;

/**
 * 类描述:    .
 *
 * @author xuping
 * 创建时间:  [2023/10/21 13:40]
 */
public class SecureUtil {
    /**
     * 给src加密
     *
     * @param src
     * @return
     */
    public static String zuMd5(String src) {
        if (src == null) {
            return null;
        }
        String target = cn.hutool.crypto.SecureUtil.md5(src);
        return cn.hutool.crypto.SecureUtil.md5(target.substring(0, 8) + src + target.substring(9, 16));
    }

    /**
     * @param src
     * @param target
     * @return
     */
    public static boolean checkZuMd5(String src, String target) {
        if (src == null) {
            return src == target;
        }
        return zuMd5(src).equalsIgnoreCase(target);
    }

}
